//
//  MCAddTicketEventView.swift
//  StoreManage
//
//  Created by MC on 2018/2/1.
//  Copyright © 2018年 MC. All rights reserved.
//

import UIKit

class MCAddTicketInputView: UIView {
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        self.backgroundColor = UIColor.white
        
        self.addSubview(lineView)
        lineView.snp.remakeConstraints { (make) ->Void in
            make.left.equalTo(10)
            make.right.bottom.equalTo(self)
            make.height.equalTo(1)
        }
        
        self.addSubview(titleLabel)
        titleLabel.snp.remakeConstraints { (make) ->Void in
            make.left.equalTo(10)
            make.centerY.bottom.equalTo(self)
        }
        
        self.addSubview(textField)
        textField.snp.remakeConstraints { (make) ->Void in
            make.left.lessThanOrEqualTo(titleLabel.snp.right).offset(-10)
            make.right.equalTo(self).offset(-10)
            make.top.bottom.equalTo(self)
        }
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    
    lazy var titleLabel: UILabel = {
        let label = UILabel()
        label.font = MCFont(14)
        label.textColor = UIColor.black
        label.text = "标题"
        return label
    }()
    
    lazy var lineView: UIView = {
        let view = UIView()
        view.backgroundColor = UIColor.MCGray_light
        return view
    }()

    lazy var textField: MCTextFiled = {
        let textField = MCTextFiled()
        textField.font = MCFont(14)
        textField.textAlignment = NSTextAlignment.right
        textField.placeholder = "请输入优惠券的名称"
        return textField
    }()
}

